#!/usr/bin/env node

const Koa = require('koa'),
      bodyparser = require('koa-bodyparser'),
      task = require('./routes/tasks'),
      log = console.log;

const app = new Koa();

//ctx 上下文； next 调用后面的中间件 
app.use(bodyparser({ enableTypes:['json','form','text'] }));
app.use(task.routes());

app.listen(8080);

